#ifndef						 NETWORK_H
#define						 NETWORK_H

#include					 <QObject>
#include					 "UdpServer.h"
#include					 "TcpClient.h"
#include					 "apinetwork.h"
#include					 "handler.h"

class						 Network : public QObject
{
	Q_OBJECT

public:
	Network(PacketHandler *, QObject *parent = 0);
	~Network();

public:
	quint16					ConnectToServer(const std::string &ip, const std::string &port);
	void					SendToTcp(Packet *packet);

	TcpClient &				getTcpClient();
	UdpServer &				getUdpServer();

public:
	friend					apiNetwork;
	apiNetwork				*getApi();

private:
	TcpClient				_tcpClient;
	UdpServer				_udpServer;

public:
	
};

#endif // NETWORK_H
